<template>
  <div class="app-container">
    <el-form
      :model="queryParams"
      ref="queryForm"
      size="small"
      :inline="true"
      v-show="showSearch"
      label-width="100px"
    >
      <!-- <el-form-item label="逻辑删除" prop="isDelete">
        <el-input
          v-model.trim="queryParams.isDelete"
          placeholder="请输入逻辑删除"
          clearable
          @keyup.enter.native="handleQuery"
        />
      </el-form-item> -->
      <el-form-item label="售后单号" prop="saleOrderNumber">
        <el-input
          v-model.trim="queryParams.saleOrderNumber"
          placeholder="请输入售后单号"
          clearable
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="内部订单号" prop="internalOrderNumber">
        <el-input
          v-model.trim="queryParams.internalOrderNumber"
          placeholder="请输入内部订单号"
          clearable
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item>
        <el-button
          type="primary"
          icon="el-icon-search"
          size="mini"
          @click="handleQuery"
          >搜索</el-button
        >
        <el-button icon="el-icon-refresh" size="mini" @click="resetQuery"
          >重置</el-button
        >
        <el-button
          :icon="!isOpen ? 'el-icon-arrow-down' : 'el-icon-arrow-up'"
          size="mini"
          @click="shouqi"
          >展开/收起</el-button
        >
      </el-form-item>

      <div v-if="isOpen">
        <el-form-item label="登记时间" prop="registrationTime">
          <el-date-picker
            clearable
            v-model="queryParams.registrationTime"
            type="date"
            value-format="yyyy-MM-dd"
            placeholder="请选择登记时间"
          >
          </el-date-picker>
        </el-form-item>
        <el-form-item label="申请日期" prop="appDate">
          <el-date-picker
            clearable
            v-model="queryParams.appDate"
            type="date"
            value-format="yyyy-MM-dd"
            placeholder="请选择申请日期"
          >
          </el-date-picker>
        </el-form-item>
        <el-form-item label="售后分类" prop="afterSalesCategory">
          <el-input
            v-model.trim="queryParams.afterSalesCategory"
            placeholder="请输入售后分类"
            clearable
            @keyup.enter.native="handleQuery"
          />
        </el-form-item>
        <el-form-item label="买家帐号" prop="visitorId">
          <el-input
            v-model.trim="queryParams.visitorId"
            placeholder="请输入买家帐号"
            clearable
            @keyup.enter.native="handleQuery"
          />
        </el-form-item>
        <el-form-item label="明细备注" prop="detailRemark">
          <el-input
            v-model.trim="queryParams.detailRemark"
            placeholder="请输入明细备注"
            clearable
            @keyup.enter.native="handleQuery"
          />
        </el-form-item>
        <el-form-item label="其它价格1" prop="otherPrice1">
          <el-input
            v-model.trim="queryParams.otherPrice1"
            placeholder="请输入其它价格1"
            clearable
            @keyup.enter.native="handleQuery"
          />
        </el-form-item>
        <el-form-item
          label="原订单收货国家"
          prop="originalOrderShippingCountry"
        >
          <el-input
            v-model.trim="queryParams.originalOrderShippingCountry"
            placeholder="请输入原订单收货国家"
            clearable
            @keyup.enter.native="handleQuery"
          />
        </el-form-item>
        <el-form-item label="收货人" prop="receiverName">
          <el-input
            v-model.trim="queryParams.receiverName"
            placeholder="请输入收货人"
            clearable
            @keyup.enter.native="handleQuery"
          />
        </el-form-item>
        <el-form-item label="次品数量" prop="defectiveCount">
          <el-input
            v-model.trim="queryParams.defectiveCount"
            placeholder="请输入次品数量"
            clearable
            @keyup.enter.native="handleQuery"
          />
        </el-form-item>
        <el-form-item label="其它价格2" prop="otherPrice2">
          <el-input
            v-model.trim="queryParams.otherPrice2"
            placeholder="请输入其它价格2"
            clearable
            @keyup.enter.native="handleQuery"
          />
        </el-form-item>
        <el-form-item label="线上申请金额" prop="applicationAmount">
          <el-input
            v-model.trim="queryParams.applicationAmount"
            placeholder="请输入线上申请金额"
            clearable
            @keyup.enter.native="handleQuery"
          />
        </el-form-item>
        <el-form-item label="VFU退货仓" prop="vfuReturnWarehouse">
          <el-input
            v-model.trim="queryParams.vfuReturnWarehouse"
            placeholder="请输入VFU退货仓"
            clearable
            @keyup.enter.native="handleQuery"
          />
        </el-form-item>
        <el-form-item label="其它价格3" prop="otherPrice3">
          <el-input
            v-model.trim="queryParams.otherPrice3"
            placeholder="请输入其它价格3"
            clearable
            @keyup.enter.native="handleQuery"
          />
        </el-form-item>
        <el-form-item label="线上退运费" prop="onlineReturnShippingFee">
          <el-input
            v-model.trim="queryParams.onlineReturnShippingFee"
            placeholder="请输入线上退运费"
            clearable
            @keyup.enter.native="handleQuery"
          />
        </el-form-item>
        <el-form-item label="VFU瑕疵仓" prop="vfuDefectStock">
          <el-input
            v-model.trim="queryParams.vfuDefectStock"
            placeholder="请输入VFU瑕疵仓"
            clearable
            @keyup.enter.native="handleQuery"
          />
        </el-form-item>
        <el-form-item label="其它价格4" prop="otherPrice4">
          <el-input
            v-model.trim="queryParams.otherPrice4"
            placeholder="请输入其它价格4"
            clearable
            @keyup.enter.native="handleQuery"
          />
        </el-form-item>
        <el-form-item label="优惠/差额" prop="discountAmount">
          <el-input
            v-model.trim="queryParams.discountAmount"
            placeholder="请输入优惠/差额"
            clearable
            @keyup.enter.native="handleQuery"
          />
        </el-form-item>
        <el-form-item label="成本价" prop="costPrice">
          <el-input
            v-model.trim="queryParams.costPrice"
            placeholder="请输入成本价"
            clearable
            @keyup.enter.native="handleQuery"
          />
        </el-form-item>
        <el-form-item label="其它属性1" prop="otherAttribute1">
          <el-input
            v-model.trim="queryParams.otherAttribute1"
            placeholder="请输入其它属性1"
            clearable
            @keyup.enter.native="handleQuery"
          />
        </el-form-item>
        <el-form-item label="卖家应退金额" prop="sellerRefundAmount">
          <el-input
            v-model.trim="queryParams.sellerRefundAmount"
            placeholder="请输入卖家应退金额"
            clearable
            @keyup.enter.native="handleQuery"
          />
        </el-form-item>
        <el-form-item label="商品品牌" prop="productBrand">
          <el-input
            v-model.trim="queryParams.productBrand"
            placeholder="请输入商品品牌"
            clearable
            @keyup.enter.native="handleQuery"
          />
        </el-form-item>
        <el-form-item label="其它属性2" prop="otherAttribute2">
          <el-input
            v-model.trim="queryParams.otherAttribute2"
            placeholder="请输入其它属性2"
            clearable
            @keyup.enter.native="handleQuery"
          />
        </el-form-item>
        <el-form-item label="买家应补偿金额" prop="buyerCompensationAmount">
          <el-input
            v-model.trim="queryParams.buyerCompensationAmount"
            placeholder="请输入买家应补偿金额"
            clearable
            @keyup.enter.native="handleQuery"
          />
        </el-form-item>
        <el-form-item label="原始订单号" prop="originalOrderId">
          <el-input
            v-model.trim="queryParams.originalOrderId"
            placeholder="请输入原始订单号"
            clearable
            @keyup.enter.native="handleQuery"
          />
        </el-form-item>
        <el-form-item label="其它属性3" prop="otherAttribute3">
          <el-input
            v-model.trim="queryParams.otherAttribute3"
            placeholder="请输入其它属性3"
            clearable
            @keyup.enter.native="handleQuery"
          />
        </el-form-item>
        <el-form-item label="卖家应退运费" prop="sellerReturnShippingFee">
          <el-input
            v-model.trim="queryParams.sellerReturnShippingFee"
            placeholder="请输入卖家应退运费"
            clearable
            @keyup.enter.native="handleQuery"
          />
        </el-form-item>
        <el-form-item label="商品标签" prop="productTag">
          <el-input
            v-model.trim="queryParams.productTag"
            placeholder="请输入商品标签"
            clearable
            @keyup.enter.native="handleQuery"
          />
        </el-form-item>
        <el-form-item label="其它属性4" prop="otherAttribute4">
          <el-input
            v-model.trim="queryParams.otherAttribute4"
            placeholder="请输入其它属性4"
            clearable
            @keyup.enter.native="handleQuery"
          />
        </el-form-item>
        <el-form-item label="实际应退金额" prop="actualRefundAmount">
          <el-input
            v-model.trim="queryParams.actualRefundAmount"
            placeholder="请输入实际应退金额"
            clearable
            @keyup.enter.native="handleQuery"
          />
        </el-form-item>
        <el-form-item label="分类" prop="category">
          <el-input
            v-model.trim="queryParams.category"
            placeholder="请输入分类"
            clearable
            @keyup.enter.native="handleQuery"
          />
        </el-form-item>
        <el-form-item label="其它属性5" prop="otherAttribute5">
          <el-input
            v-model.trim="queryParams.otherAttribute5"
            placeholder="请输入其它属性5"
            clearable
            @keyup.enter.native="handleQuery"
          />
        </el-form-item>
        <el-form-item label="买家退款账号" prop="buyerRefundAccount">
          <el-input
            v-model.trim="queryParams.buyerRefundAccount"
            placeholder="请输入买家退款账号"
            clearable
            @keyup.enter.native="handleQuery"
          />
        </el-form-item>
        <el-form-item label="供应商商品款号" prop="supplierProductSku">
          <el-input
            v-model.trim="queryParams.supplierProductSku"
            placeholder="请输入供应商商品款号"
            clearable
            @keyup.enter.native="handleQuery"
          />
        </el-form-item>
        <el-form-item label="原订单旗帜" prop="originalOrderFlag">
          <el-input
            v-model.trim="queryParams.originalOrderFlag"
            placeholder="请输入原订单旗帜"
            clearable
            @keyup.enter.native="handleQuery"
          />
        </el-form-item>
        <el-form-item label="卖家退款账号" prop="sellerRefundAccount">
          <el-input
            v-model.trim="queryParams.sellerRefundAccount"
            placeholder="请输入卖家退款账号"
            clearable
            @keyup.enter.native="handleQuery"
          />
        </el-form-item>
        <el-form-item label="供应商商品编码" prop="supplierProductCode">
          <el-input
            v-model.trim="queryParams.supplierProductCode"
            placeholder="请输入供应商商品编码"
            clearable
            @keyup.enter.native="handleQuery"
          />
        </el-form-item>
        <el-form-item label="收货仓" prop="warehouseReceived">
          <el-input
            v-model.trim="queryParams.warehouseReceived"
            placeholder="请输入收货仓"
            clearable
            @keyup.enter.native="handleQuery"
          />
        </el-form-item>
        <el-form-item label="简称" prop="shortName">
          <el-input
            v-model.trim="queryParams.shortName"
            placeholder="请输入简称"
            clearable
            @keyup.enter.native="handleQuery"
          />
        </el-form-item>
        <el-form-item label="原订单标签" prop="originalOrderTag">
          <el-input
            v-model.trim="queryParams.originalOrderTag"
            placeholder="请输入原订单标签"
            clearable
            @keyup.enter.native="handleQuery"
          />
        </el-form-item>
        <el-form-item label="仓库" prop="warehouse">
          <el-input
            v-model.trim="queryParams.warehouse"
            placeholder="请输入仓库"
            clearable
            @keyup.enter.native="handleQuery"
          />
        </el-form-item>
        <el-form-item label="国标码" prop="nationalStandardCode">
          <el-input
            v-model.trim="queryParams.nationalStandardCode"
            placeholder="请输入国标码"
            clearable
            @keyup.enter.native="handleQuery"
          />
        </el-form-item>
        <el-form-item
          label="原订单便签｜线下备注"
          prop="originalOrderNoteOrOfflineNote"
        >
          <el-input
            v-model.trim="queryParams.originalOrderNoteOrOfflineNote"
            placeholder="请输入原订单便签｜线下备注"
            clearable
            @keyup.enter.native="handleQuery"
          />
        </el-form-item>
        <el-form-item label="店铺编号" prop="shopId">
          <el-input
            v-model.trim="queryParams.shopId"
            placeholder="请输入店铺编号"
            clearable
            @keyup.enter.native="handleQuery"
          />
        </el-form-item>
        <el-form-item label="原订单下单金额" prop="originalOrderAmount">
          <el-input
            v-model.trim="queryParams.originalOrderAmount"
            placeholder="请输入原订单下单金额"
            clearable
            @keyup.enter.native="handleQuery"
          />
        </el-form-item>
        <el-form-item label="店铺名称" prop="shopName">
          <el-input
            v-model.trim="queryParams.shopName"
            placeholder="请输入店铺名称"
            clearable
            @keyup.enter.native="handleQuery"
          />
        </el-form-item>
        <el-form-item label="原订单买家留言" prop="originalOrderBuyerMessage">
          <el-input
            v-model.trim="queryParams.originalOrderBuyerMessage"
            placeholder="请输入原订单买家留言"
            clearable
            @keyup.enter.native="handleQuery"
          />
        </el-form-item>
        <el-form-item label="线上订单号" prop="orderId">
          <el-input
            v-model.trim="queryParams.orderId"
            placeholder="请输入线上订单号"
            clearable
            @keyup.enter.native="handleQuery"
          />
        </el-form-item>
        <el-form-item label="原订单业务员" prop="originalOrderSalesperson">
          <el-input
            v-model.trim="queryParams.originalOrderSalesperson"
            placeholder="请输入原订单业务员"
            clearable
            @keyup.enter.native="handleQuery"
          />
        </el-form-item>
        <el-form-item label="订单日期" prop="orderDate">
          <el-date-picker
            clearable
            v-model="queryParams.orderDate"
            type="date"
            value-format="yyyy-MM-dd"
            placeholder="请选择订单日期"
          >
          </el-date-picker>
        </el-form-item>
        <el-form-item label="订单支付日期" prop="orderPaymentDate">
          <el-date-picker
            clearable
            v-model="queryParams.orderPaymentDate"
            type="date"
            value-format="yyyy-MM-dd"
            placeholder="请选择订单支付日期"
          >
          </el-date-picker>
        </el-form-item>
        <el-form-item label="原订单快递" prop="originalOrderCourier">
          <el-input
            v-model.trim="queryParams.originalOrderCourier"
            placeholder="请输入原订单快递"
            clearable
            @keyup.enter.native="handleQuery"
          />
        </el-form-item>
        <el-form-item label="原订单快递单号" prop="originalOrderShipmentId">
          <el-input
            v-model.trim="queryParams.originalOrderShipmentId"
            placeholder="请输入原订单快递单号"
            clearable
            @keyup.enter.native="handleQuery"
          />
        </el-form-item>
        <el-form-item label="处理结果" prop="processResult">
          <el-input
            v-model.trim="queryParams.processResult"
            placeholder="请输入处理结果"
            clearable
            @keyup.enter.native="handleQuery"
          />
        </el-form-item>
        <el-form-item
          label="原订单发货仓库"
          prop="originalOrderShipmentwarehouse"
        >
          <el-input
            v-model.trim="queryParams.originalOrderShipmentwarehouse"
            placeholder="请输入原订单发货仓库"
            clearable
            @keyup.enter.native="handleQuery"
          />
        </el-form-item>
        <el-form-item label="售后问题登记(线下备注)" prop="saleIssueNote">
          <el-input
            v-model.trim="queryParams.saleIssueNote"
            placeholder="请输入售后问题登记(线下备注)"
            clearable
            @keyup.enter.native="handleQuery"
          />
        </el-form-item>
        <el-form-item label="最后确认日期" prop="lastConfirmationDate">
          <el-date-picker
            clearable
            v-model="queryParams.lastConfirmationDate"
            type="date"
            value-format="yyyy-MM-dd"
            placeholder="请选择最后确认日期"
          >
          </el-date-picker>
        </el-form-item>
        <el-form-item label="最后修改日期" prop="lastModifiedDate">
          <el-date-picker
            clearable
            v-model="queryParams.lastModifiedDate"
            type="date"
            value-format="yyyy-MM-dd"
            placeholder="请选择最后修改日期"
          >
          </el-date-picker>
        </el-form-item>
        <el-form-item label="退回快递公司" prop="returnedShippingCompany">
          <el-input
            v-model.trim="queryParams.returnedShippingCompany"
            placeholder="请输入退回快递公司"
            clearable
            @keyup.enter.native="handleQuery"
          />
        </el-form-item>
        <el-form-item label="退回快递单号(运单号)" prop="returnShippingCode">
          <el-input
            v-model.trim="queryParams.returnShippingCode"
            placeholder="请输入退回快递单号(运单号)"
            clearable
            @keyup.enter.native="handleQuery"
          />
        </el-form-item>
        <el-form-item label="订单发货时间" prop="orderShipmentDate">
          <el-date-picker
            clearable
            v-model="queryParams.orderShipmentDate"
            type="date"
            value-format="yyyy-MM-dd"
            placeholder="请选择订单发货时间"
          >
          </el-date-picker>
        </el-form-item>
        <el-form-item label="已提交供销商" prop="submittedSupplier">
          <el-input
            v-model.trim="queryParams.submittedSupplier"
            placeholder="请输入已提交供销商"
            clearable
            @keyup.enter.native="handleQuery"
          />
        </el-form-item>
        <el-form-item label="已提交分销商" prop="submittedDistributor">
          <el-input
            v-model.trim="queryParams.submittedDistributor"
            placeholder="请输入已提交分销商"
            clearable
            @keyup.enter.native="handleQuery"
          />
        </el-form-item>
        <el-form-item label="分销商" prop="distributor">
          <el-input
            v-model.trim="queryParams.distributor"
            placeholder="请输入分销商"
            clearable
            @keyup.enter.native="handleQuery"
          />
        </el-form-item>
        <el-form-item label="退款编码" prop="refundCode">
          <el-input
            v-model.trim="queryParams.refundCode"
            placeholder="请输入退款编码"
            clearable
            @keyup.enter.native="handleQuery"
          />
        </el-form-item>
        <el-form-item label="售后问题登记(图片)" prop="afterSalesIssueRecord">
          <el-input
            v-model.trim="queryParams.afterSalesIssueRecord"
            placeholder="请输入售后问题登记(图片)"
            clearable
            @keyup.enter.native="handleQuery"
          />
        </el-form-item>
        <el-form-item label="售后异常" prop="saleExceptionCount">
          <el-input
            v-model.trim="queryParams.saleExceptionCount"
            placeholder="请输入售后异常"
            clearable
            @keyup.enter.native="handleQuery"
          />
        </el-form-item>
        <el-form-item label="外部单号" prop="externalOrderNumber">
          <el-input
            v-model.trim="queryParams.externalOrderNumber"
            placeholder="请输入外部单号"
            clearable
            @keyup.enter.native="handleQuery"
          />
        </el-form-item>
        <el-form-item label="图片" prop="imageData">
          <el-input
            v-model.trim="queryParams.imageData"
            placeholder="请输入图片"
            clearable
            @keyup.enter.native="handleQuery"
          />
        </el-form-item>
        <el-form-item label="商品编码" prop="productCode">
          <el-input
            v-model.trim="queryParams.productCode"
            placeholder="请输入商品编码"
            clearable
            @keyup.enter.native="handleQuery"
          />
        </el-form-item>
        <el-form-item label="款式编码" prop="styleCode">
          <el-input
            v-model.trim="queryParams.styleCode"
            placeholder="请输入款式编码"
            clearable
            @keyup.enter.native="handleQuery"
          />
        </el-form-item>
        <el-form-item label="线上子订单编号" prop="orderSubId">
          <el-input
            v-model.trim="queryParams.orderSubId"
            placeholder="请输入线上子订单编号"
            clearable
            @keyup.enter.native="handleQuery"
          />
        </el-form-item>
        <el-form-item label="申请数量" prop="applicationCount">
          <el-input
            v-model.trim="queryParams.applicationCount"
            placeholder="请输入申请数量"
            clearable
            @keyup.enter.native="handleQuery"
          />
        </el-form-item>
        <el-form-item label="退货数量" prop="returnQuantity">
          <el-input
            v-model.trim="queryParams.returnQuantity"
            placeholder="请输入退货数量"
            clearable
            @keyup.enter.native="handleQuery"
          />
        </el-form-item>
        <el-form-item label="单价" prop="unitPrice">
          <el-input
            v-model.trim="queryParams.unitPrice"
            placeholder="请输入单价"
            clearable
            @keyup.enter.native="handleQuery"
          />
        </el-form-item>
        <el-form-item label="申请金额" prop="appAmount">
          <el-input
            v-model.trim="queryParams.appAmount"
            placeholder="请输入申请金额"
            clearable
            @keyup.enter.native="handleQuery"
          />
        </el-form-item>
        <el-form-item label="商品名" prop="productName">
          <el-input
            v-model.trim="queryParams.productName"
            placeholder="请输入商品名"
            clearable
            @keyup.enter.native="handleQuery"
          />
        </el-form-item>
        <el-form-item label="颜色规格" prop="colorSpecification">
          <el-input
            v-model.trim="queryParams.colorSpecification"
            placeholder="请输入颜色规格"
            clearable
            @keyup.enter.native="handleQuery"
          />
        </el-form-item>
        <el-form-item label="进仓时间" prop="entryTime">
          <el-date-picker
            clearable
            v-model="queryParams.entryTime"
            type="date"
            value-format="yyyy-MM-dd"
            placeholder="请选择进仓时间"
          >
          </el-date-picker>
        </el-form-item>
      </div>
      <!-- <el-form-item>
        <el-button
          type="primary"
          icon="el-icon-search"
          size="mini"
          @click="handleQuery"
          >搜索</el-button
        >
        <el-button icon="el-icon-refresh" size="mini" @click="resetQuery"
          >重置</el-button
        >
      </el-form-item> -->
    </el-form>

    <el-row :gutter="10" class="mb8">
      <el-col :span="1.5">
        <el-button
          type="primary"
          plain
          icon="el-icon-plus"
          size="mini"
          @click="handleAdd"
          v-hasPermi="['live:BiOrderAftersales:add']"
          >新增</el-button
        >
      </el-col>
      <el-col :span="1.5">
        <el-button
          type="success"
          plain
          icon="el-icon-edit"
          size="mini"
          :disabled="single"
          @click="handleUpdate"
          v-hasPermi="['live:BiOrderAftersales:edit']"
          >修改</el-button
        >
      </el-col>
      <el-col :span="1.5">
        <el-button
          type="danger"
          plain
          icon="el-icon-delete"
          size="mini"
          :disabled="multiple"
          @click="handleDelete"
          v-hasPermi="['live:BiOrderAftersales:remove']"
          >删除</el-button
        >
      </el-col>
      <el-col :span="1.5">
        <el-button
          type="warning"
          plain
          icon="el-icon-download"
          size="mini"
          @click="handleExport"
          v-hasPermi="['live:BiOrderAftersales:export']"
          >导出</el-button
        >
      </el-col>
      <el-col :span="1.5">
        <uploadFile
          @handleSuccess="getList"
          :uploadUrl="'/live/BiOrderAftersales/importData'"
        />
      </el-col>
      <right-toolbar
        :showSearch.sync="showSearch"
        @queryTable="getList"
      ></right-toolbar>
    </el-row>

    <el-table
      v-loading="loading"
      :data="BiOrderAftersalesList"
      @selection-change="handleSelectionChange"
      :height="650"
    >
      <el-table-column type="selection" width="55" align="center" />
      <el-table-column label="id" align="center" prop="id" />
      <!-- <el-table-column width="155" label="逻辑删除" align="center" prop="isDelete" /> -->
      <el-table-column
        width="155"
        label="售后单号"
        align="center"
        prop="saleOrderNumber"
      />
      <el-table-column
        width="155"
        label="内部订单号"
        align="center"
        prop="internalOrderNumber"
      />
      <el-table-column
        width="155"
        label="登记时间"
        align="center"
        prop="registrationTime"
      >
        <template slot-scope="scope">
          <span>{{
            parseTime(scope.row.registrationTime, "{y}-{m}-{d}")
          }}</span>
        </template>
      </el-table-column>
      <el-table-column
        width="155"
        label="申请日期"
        align="center"
        prop="appDate"
      >
        <template slot-scope="scope">
          <span>{{ parseTime(scope.row.appDate, "{y}-{m}-{d}") }}</span>
        </template>
      </el-table-column>
      <el-table-column
        width="155"
        label="线上类型"
        align="center"
        prop="onlineType"
      />
      <el-table-column
        width="155"
        label="售后分类"
        align="center"
        prop="afterSalesCategory"
      />
      <el-table-column
        width="155"
        label="买家帐号"
        align="center"
        prop="visitorId"
      >
        <template slot-scope="scope">
          <mypopover :popoverInput="scope.row.visitorId" />
        </template>
      </el-table-column>
      <el-table-column
        width="155"
        label="明细备注"
        align="center"
        prop="detailRemark"
      />
      <el-table-column
        width="155"
        label="其它价格1"
        align="center"
        prop="otherPrice1"
      />
      <el-table-column
        width="155"
        label="原订单收货国家"
        align="center"
        prop="originalOrderShippingCountry"
      />
      <el-table-column
        width="155"
        label="收货人"
        align="center"
        prop="receiverName"
      />
      <el-table-column
        width="155"
        label="次品数量"
        align="center"
        prop="defectiveCount"
      />
      <el-table-column
        width="155"
        label="其它价格2"
        align="center"
        prop="otherPrice2"
      />
      <el-table-column
        width="155"
        label="线上申请金额"
        align="center"
        prop="applicationAmount"
      />
      <el-table-column
        width="155"
        label="VFU退货仓"
        align="center"
        prop="vfuReturnWarehouse"
      />
      <el-table-column
        width="155"
        label="其它价格3"
        align="center"
        prop="otherPrice3"
      />
      <el-table-column
        width="155"
        label="线上退运费"
        align="center"
        prop="onlineReturnShippingFee"
      />
      <el-table-column
        width="155"
        label="VFU瑕疵仓"
        align="center"
        prop="vfuDefectStock"
      />
      <el-table-column
        width="155"
        label="其它价格4"
        align="center"
        prop="otherPrice4"
      />
      <el-table-column
        width="155"
        label="优惠/差额"
        align="center"
        prop="discountAmount"
      />
      <el-table-column
        width="155"
        label="成本价"
        align="center"
        prop="costPrice"
      />
      <el-table-column
        width="155"
        label="其它属性1"
        align="center"
        prop="otherAttribute1"
      />
      <el-table-column
        width="155"
        label="卖家应退金额"
        align="center"
        prop="sellerRefundAmount"
      />
      <el-table-column
        width="155"
        label="商品品牌"
        align="center"
        prop="productBrand"
      />
      <el-table-column
        width="155"
        label="其它属性2"
        align="center"
        prop="otherAttribute2"
      />
      <el-table-column
        width="155"
        label="买家应补偿金额"
        align="center"
        prop="buyerCompensationAmount"
      />
      <el-table-column
        width="155"
        label="原始订单号"
        align="center"
        prop="originalOrderId"
      >
        <template slot-scope="scope">
          <mypopover :popoverInput="scope.row.originalOrderId" /> </template
      ></el-table-column>
      <el-table-column
        width="155"
        label="其它属性3"
        align="center"
        prop="otherAttribute3"
      />
      <el-table-column
        width="155"
        label="卖家应退运费"
        align="center"
        prop="sellerReturnShippingFee"
      />
      <el-table-column
        width="155"
        label="商品标签"
        align="center"
        prop="productTag"
      />
      <el-table-column
        width="155"
        label="其它属性4"
        align="center"
        prop="otherAttribute4"
      />
      <el-table-column
        width="155"
        label="实际应退金额"
        align="center"
        prop="actualRefundAmount"
      />
      <el-table-column width="155" label="分类" align="center" prop="category">
        <template slot-scope="scope">
          <mypopover :popoverInput="scope.row.category" /> </template
      ></el-table-column>
      <el-table-column
        width="155"
        label="其它属性5"
        align="center"
        prop="otherAttribute5"
      />
      <el-table-column
        width="155"
        label="买家退款账号"
        align="center"
        prop="buyerRefundAccount"
      />
      <el-table-column
        width="155"
        label="供应商商品款号"
        align="center"
        prop="supplierProductSku"
      />
      <el-table-column
        width="155"
        label="原订单旗帜"
        align="center"
        prop="originalOrderFlag"
      />
      <el-table-column
        width="155"
        label="卖家退款账号"
        align="center"
        prop="sellerRefundAccount"
      />
      <el-table-column
        width="155"
        label="供应商商品编码"
        align="center"
        prop="supplierProductCode"
      />
      <el-table-column
        width="155"
        label="原订单备注"
        align="center"
        prop="originalOrderNote"
      >
        <template slot-scope="scope">
          <mypopover :popoverInput="scope.row.originalOrderNote" /> </template
      ></el-table-column>
      <el-table-column
        width="155"
        label="收货仓"
        align="center"
        prop="warehouseReceived"
      >
        <template slot-scope="scope">
          <mypopover :popoverInput="scope.row.warehouseReceived" /> </template
      ></el-table-column>
      <el-table-column
        width="155"
        label="简称"
        align="center"
        prop="shortName"
      />
      <el-table-column
        width="155"
        label="原订单标签"
        align="center"
        prop="originalOrderTag"
      >
        <template slot-scope="scope">
          <mypopover :popoverInput="scope.row.originalOrderTag" /> </template
      ></el-table-column>
      <el-table-column width="155" label="仓库" align="center" prop="warehouse">
        <template slot-scope="scope">
          <mypopover :popoverInput="scope.row.warehouse" /> </template
      ></el-table-column>
      <el-table-column
        width="155"
        label="国标码"
        align="center"
        prop="nationalStandardCode"
      />
      <el-table-column
        width="155"
        label="原订单便签｜线下备注"
        align="center"
        prop="originalOrderNoteOrOfflineNote"
      />
      <el-table-column
        width="155"
        label="店铺编号"
        align="center"
        prop="shopId"
      />
      <el-table-column
        width="155"
        label="原订单下单金额"
        align="center"
        prop="originalOrderAmount"
      />
      <el-table-column
        width="155"
        label="店铺名称"
        align="center"
        prop="shopName"
      />
      <el-table-column
        width="155"
        label="原订单买家留言"
        align="center"
        prop="originalOrderBuyerMessage"
      />
      <el-table-column
        width="155"
        label="线上订单号"
        align="center"
        prop="orderId"
      >
        <template slot-scope="scope">
          <mypopover :popoverInput="scope.row.orderId" /> </template
      ></el-table-column>
      <el-table-column
        width="155"
        label="原订单业务员"
        align="center"
        prop="originalOrderSalesperson"
      />
      <el-table-column
        width="155"
        label="问题类型"
        align="center"
        prop="issueType"
      />
      <el-table-column
        width="155"
        label="订单日期"
        align="center"
        prop="orderDate"
      >
        <template slot-scope="scope">
          <span>{{ parseTime(scope.row.orderDate, "{y}-{m}-{d}") }}</span>
        </template>
      </el-table-column>
      <el-table-column
        width="155"
        label="原订单状态"
        align="center"
        prop="originalOrderStatus"
      />
      <el-table-column
        width="155"
        label="订单支付日期"
        align="center"
        prop="orderPaymentDate"
      >
        <template slot-scope="scope">
          <span>{{
            parseTime(scope.row.orderPaymentDate, "{y}-{m}-{d}")
          }}</span>
        </template>
      </el-table-column>
      <el-table-column
        width="155"
        label="原订单类型"
        align="center"
        prop="originalOrderType"
      />
      <el-table-column
        width="155"
        label="原订单快递"
        align="center"
        prop="originalOrderCourier"
      />
      <el-table-column width="155" label="备注" align="center" prop="remark" />
      <el-table-column
        width="155"
        label="原订单快递单号"
        align="center"
        prop="originalOrderShipmentId"
      />
      <el-table-column
        width="155"
        label="处理结果"
        align="center"
        prop="processResult"
      />
      <el-table-column
        width="155"
        label="原订单发货仓库"
        align="center"
        prop="originalOrderShipmentwarehouse"
      >
        <template slot-scope="scope">
          <mypopover
            :popoverInput="scope.row.originalOrderShipmentwarehouse"
          /> </template
      ></el-table-column>
      <el-table-column
        width="155"
        label="售后问题登记(线下备注)"
        align="center"
        prop="saleIssueNote"
      />
      <el-table-column width="155" label="状态" align="center" prop="status" />
      <el-table-column
        width="155"
        label="线上状态"
        align="center"
        prop="onlineStatus"
      />
      <el-table-column
        width="155"
        label="货物状态"
        align="center"
        prop="itemStatus"
      />
      <el-table-column
        width="155"
        label="最后确认日期"
        align="center"
        prop="lastConfirmationDate"
      >
        <template slot-scope="scope">
          <span>{{
            parseTime(scope.row.lastConfirmationDate, "{y}-{m}-{d}")
          }}</span>
        </template>
      </el-table-column>
      <el-table-column
        width="155"
        label="最后修改日期"
        align="center"
        prop="lastModifiedDate"
      >
        <template slot-scope="scope">
          <span>{{
            parseTime(scope.row.lastModifiedDate, "{y}-{m}-{d}")
          }}</span>
        </template>
      </el-table-column>
      <el-table-column
        width="155"
        label="退回快递公司"
        align="center"
        prop="returnedShippingCompany"
      />
      <el-table-column
        width="155"
        label="退回快递单号(运单号)"
        align="center"
        prop="returnShippingCode"
      />
      <el-table-column
        width="155"
        label="订单发货时间"
        align="center"
        prop="orderShipmentDate"
      >
        <template slot-scope="scope">
          <span>{{
            parseTime(scope.row.orderShipmentDate, "{y}-{m}-{d}")
          }}</span>
        </template>
      </el-table-column>
      <el-table-column
        width="155"
        label="已提交供销商"
        align="center"
        prop="submittedSupplier"
      />
      <el-table-column
        width="155"
        label="已提交分销商"
        align="center"
        prop="submittedDistributor"
      />
      <el-table-column
        width="155"
        label="分销商"
        align="center"
        prop="distributor"
      />
      <el-table-column
        width="155"
        label="退款编码"
        align="center"
        prop="refundCode"
      >
        <template slot-scope="scope">
          <mypopover :popoverInput="scope.row.refundCode" /> </template
      ></el-table-column>
      <el-table-column
        width="155"
        label="售后问题登记(图片)"
        align="center"
        prop="afterSalesIssueRecord"
      >
        <template slot-scope="scope">
          <image-preview-full
            :src="scope.row.afterSalesIssueRecord"
            :width="30"
            :height="30"
          />
        </template>
      </el-table-column>
      <el-table-column
        width="155"
        label="币种"
        align="center"
        prop="currencyType"
      />
      <el-table-column
        width="155"
        label="售后异常"
        align="center"
        prop="saleExceptionCount"
      />
      <el-table-column
        width="155"
        label="外部单号"
        align="center"
        prop="externalOrderNumber"
      />
      <el-table-column width="155" label="图片" align="center" prop="imageData">
        <template slot-scope="scope">
          <image-preview-full
            :src="scope.row.imageData"
            :width="30"
            :height="30"
          />
        </template>
      </el-table-column>
      <el-table-column
        width="155"
        label="商品编码"
        align="center"
        prop="productCode"
      />
      <el-table-column
        width="155"
        label="款式编码"
        align="center"
        prop="styleCode"
      />
      <el-table-column
        width="155"
        label="线上子订单编号"
        align="center"
        prop="orderSubId"
      >
        <template slot-scope="scope">
          <mypopover :popoverInput="scope.row.orderSubId" /> </template
      ></el-table-column>
      <el-table-column
        width="155"
        label="申请数量"
        align="center"
        prop="applicationCount"
      />
      <el-table-column
        width="155"
        label="退货数量"
        align="center"
        prop="returnQuantity"
      />
      <el-table-column
        width="155"
        label="单价"
        align="center"
        prop="unitPrice"
      />
      <el-table-column
        width="155"
        label="申请金额"
        align="center"
        prop="appAmount"
      />
      <el-table-column
        width="155"
        label="商品名"
        align="center"
        prop="productName"
      >
        <template slot-scope="scope">
          <mypopover :popoverInput="scope.row.productName" /> </template
      ></el-table-column>
      <el-table-column
        width="155"
        label="类型"
        align="center"
        prop="dataType"
      />
      <el-table-column
        width="155"
        label="明细问题类型"
        align="center"
        prop="detailIssueType"
      />
      <el-table-column
        width="155"
        label="颜色规格"
        align="center"
        prop="colorSpecification"
      />
      <el-table-column
        width="155"
        label="进仓时间"
        align="center"
        prop="entryTime"
      >
        <template slot-scope="scope">
          <span>{{ parseTime(scope.row.entryTime, "{y}-{m}-{d}") }}</span>
        </template>
      </el-table-column>
      <el-table-column
        width="155"
        label="操作"
        align="center"
        class-name="small-padding fixed-width"
      >
        <template slot-scope="scope">
          <el-button
            size="mini"
            type="text"
            icon="el-icon-edit"
            @click="handleUpdate(scope.row)"
            v-hasPermi="['live:BiOrderAftersales:edit']"
            >修改</el-button
          >
          <el-button
            size="mini"
            type="text"
            icon="el-icon-delete"
            @click="handleDelete(scope.row)"
            v-hasPermi="['live:BiOrderAftersales:remove']"
            >删除</el-button
          >
        </template>
      </el-table-column>
    </el-table>

    <pagination
      v-show="total > 0"
      :total="total"
      :page.sync="queryParams.pageNum"
      :limit.sync="queryParams.pageSize"
      @pagination="getList"
    />

    <!-- 添加或修改订单售后对话框 -->
    <el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
      <el-form ref="form" :model="form" :rules="rules" label-width="80px">
        <el-form-item label="逻辑删除" prop="isDelete">
          <el-input v-model.trim="form.isDelete" placeholder="请输入逻辑删除" />
        </el-form-item>
        <el-form-item label="售后单号" prop="saleOrderNumber">
          <el-input
            v-model.trim="form.saleOrderNumber"
            placeholder="请输入售后单号"
          />
        </el-form-item>
        <el-form-item label="内部订单号" prop="internalOrderNumber">
          <el-input
            v-model.trim="form.internalOrderNumber"
            placeholder="请输入内部订单号"
          />
        </el-form-item>
        <el-form-item label="登记时间" prop="registrationTime">
          <el-date-picker
            clearable
            v-model="form.registrationTime"
            type="date"
            value-format="yyyy-MM-dd"
            placeholder="请选择登记时间"
          >
          </el-date-picker>
        </el-form-item>
        <el-form-item label="申请日期" prop="appDate">
          <el-date-picker
            clearable
            v-model="form.appDate"
            type="date"
            value-format="yyyy-MM-dd"
            placeholder="请选择申请日期"
          >
          </el-date-picker>
        </el-form-item>
        <el-form-item label="售后分类" prop="afterSalesCategory">
          <el-input
            v-model.trim="form.afterSalesCategory"
            placeholder="请输入售后分类"
          />
        </el-form-item>
        <el-form-item label="买家帐号" prop="visitorId">
          <el-input
            v-model.trim="form.visitorId"
            placeholder="请输入买家帐号"
          />
        </el-form-item>
        <el-form-item label="明细备注" prop="detailRemark">
          <el-input
            v-model.trim="form.detailRemark"
            placeholder="请输入明细备注"
          />
        </el-form-item>
        <el-form-item label="其它价格1" prop="otherPrice1">
          <el-input
            v-model.trim="form.otherPrice1"
            placeholder="请输入其它价格1"
          />
        </el-form-item>
        <el-form-item
          label="原订单收货国家"
          prop="originalOrderShippingCountry"
        >
          <el-input
            v-model.trim="form.originalOrderShippingCountry"
            placeholder="请输入原订单收货国家"
          />
        </el-form-item>
        <el-form-item label="收货人" prop="receiverName">
          <el-input
            v-model.trim="form.receiverName"
            placeholder="请输入收货人"
          />
        </el-form-item>
        <el-form-item label="次品数量" prop="defectiveCount">
          <el-input
            v-model.trim="form.defectiveCount"
            placeholder="请输入次品数量"
          />
        </el-form-item>
        <el-form-item label="其它价格2" prop="otherPrice2">
          <el-input
            v-model.trim="form.otherPrice2"
            placeholder="请输入其它价格2"
          />
        </el-form-item>
        <el-form-item label="线上申请金额" prop="applicationAmount">
          <el-input
            v-model.trim="form.applicationAmount"
            placeholder="请输入线上申请金额"
          />
        </el-form-item>
        <el-form-item label="VFU退货仓" prop="vfuReturnWarehouse">
          <el-input
            v-model.trim="form.vfuReturnWarehouse"
            placeholder="请输入VFU退货仓"
          />
        </el-form-item>
        <el-form-item label="其它价格3" prop="otherPrice3">
          <el-input
            v-model.trim="form.otherPrice3"
            placeholder="请输入其它价格3"
          />
        </el-form-item>
        <el-form-item label="线上退运费" prop="onlineReturnShippingFee">
          <el-input
            v-model.trim="form.onlineReturnShippingFee"
            placeholder="请输入线上退运费"
          />
        </el-form-item>
        <el-form-item label="VFU瑕疵仓" prop="vfuDefectStock">
          <el-input
            v-model.trim="form.vfuDefectStock"
            placeholder="请输入VFU瑕疵仓"
          />
        </el-form-item>
        <el-form-item label="其它价格4" prop="otherPrice4">
          <el-input
            v-model.trim="form.otherPrice4"
            placeholder="请输入其它价格4"
          />
        </el-form-item>
        <el-form-item label="优惠/差额" prop="discountAmount">
          <el-input
            v-model.trim="form.discountAmount"
            placeholder="请输入优惠/差额"
          />
        </el-form-item>
        <el-form-item label="成本价" prop="costPrice">
          <el-input v-model.trim="form.costPrice" placeholder="请输入成本价" />
        </el-form-item>
        <el-form-item label="其它属性1" prop="otherAttribute1">
          <el-input
            v-model.trim="form.otherAttribute1"
            placeholder="请输入其它属性1"
          />
        </el-form-item>
        <el-form-item label="卖家应退金额" prop="sellerRefundAmount">
          <el-input
            v-model.trim="form.sellerRefundAmount"
            placeholder="请输入卖家应退金额"
          />
        </el-form-item>
        <el-form-item label="商品品牌" prop="productBrand">
          <el-input
            v-model.trim="form.productBrand"
            placeholder="请输入商品品牌"
          />
        </el-form-item>
        <el-form-item label="其它属性2" prop="otherAttribute2">
          <el-input
            v-model.trim="form.otherAttribute2"
            placeholder="请输入其它属性2"
          />
        </el-form-item>
        <el-form-item label="买家应补偿金额" prop="buyerCompensationAmount">
          <el-input
            v-model.trim="form.buyerCompensationAmount"
            placeholder="请输入买家应补偿金额"
          />
        </el-form-item>
        <el-form-item label="原始订单号" prop="originalOrderId">
          <el-input
            v-model.trim="form.originalOrderId"
            placeholder="请输入原始订单号"
          />
        </el-form-item>
        <el-form-item label="其它属性3" prop="otherAttribute3">
          <el-input
            v-model.trim="form.otherAttribute3"
            placeholder="请输入其它属性3"
          />
        </el-form-item>
        <el-form-item label="卖家应退运费" prop="sellerReturnShippingFee">
          <el-input
            v-model.trim="form.sellerReturnShippingFee"
            placeholder="请输入卖家应退运费"
          />
        </el-form-item>
        <el-form-item label="商品标签" prop="productTag">
          <el-input
            v-model.trim="form.productTag"
            placeholder="请输入商品标签"
          />
        </el-form-item>
        <el-form-item label="其它属性4" prop="otherAttribute4">
          <el-input
            v-model.trim="form.otherAttribute4"
            placeholder="请输入其它属性4"
          />
        </el-form-item>
        <el-form-item label="实际应退金额" prop="actualRefundAmount">
          <el-input
            v-model.trim="form.actualRefundAmount"
            placeholder="请输入实际应退金额"
          />
        </el-form-item>
        <el-form-item label="分类" prop="category">
          <el-input v-model.trim="form.category" placeholder="请输入分类" />
        </el-form-item>
        <el-form-item label="其它属性5" prop="otherAttribute5">
          <el-input
            v-model.trim="form.otherAttribute5"
            placeholder="请输入其它属性5"
          />
        </el-form-item>
        <el-form-item label="买家退款账号" prop="buyerRefundAccount">
          <el-input
            v-model.trim="form.buyerRefundAccount"
            placeholder="请输入买家退款账号"
          />
        </el-form-item>
        <el-form-item label="供应商商品款号" prop="supplierProductSku">
          <el-input
            v-model.trim="form.supplierProductSku"
            placeholder="请输入供应商商品款号"
          />
        </el-form-item>
        <el-form-item label="原订单旗帜" prop="originalOrderFlag">
          <el-input
            v-model.trim="form.originalOrderFlag"
            placeholder="请输入原订单旗帜"
          />
        </el-form-item>
        <el-form-item label="卖家退款账号" prop="sellerRefundAccount">
          <el-input
            v-model.trim="form.sellerRefundAccount"
            placeholder="请输入卖家退款账号"
          />
        </el-form-item>
        <el-form-item label="供应商商品编码" prop="supplierProductCode">
          <el-input
            v-model.trim="form.supplierProductCode"
            placeholder="请输入供应商商品编码"
          />
        </el-form-item>
        <el-form-item label="原订单备注" prop="originalOrderNote">
          <el-input
            v-model.trim="form.originalOrderNote"
            type="textarea"
            placeholder="请输入内容"
          />
        </el-form-item>
        <el-form-item label="收货仓" prop="warehouseReceived">
          <el-input
            v-model.trim="form.warehouseReceived"
            placeholder="请输入收货仓"
          />
        </el-form-item>
        <el-form-item label="简称" prop="shortName">
          <el-input v-model.trim="form.shortName" placeholder="请输入简称" />
        </el-form-item>
        <el-form-item label="原订单标签" prop="originalOrderTag">
          <el-input
            v-model.trim="form.originalOrderTag"
            placeholder="请输入原订单标签"
          />
        </el-form-item>
        <el-form-item label="仓库" prop="warehouse">
          <el-input v-model.trim="form.warehouse" placeholder="请输入仓库" />
        </el-form-item>
        <el-form-item label="国标码" prop="nationalStandardCode">
          <el-input
            v-model.trim="form.nationalStandardCode"
            placeholder="请输入国标码"
          />
        </el-form-item>
        <el-form-item
          label="原订单便签｜线下备注"
          prop="originalOrderNoteOrOfflineNote"
        >
          <el-input
            v-model.trim="form.originalOrderNoteOrOfflineNote"
            placeholder="请输入原订单便签｜线下备注"
          />
        </el-form-item>
        <el-form-item label="店铺编号" prop="shopId">
          <el-input v-model.trim="form.shopId" placeholder="请输入店铺编号" />
        </el-form-item>
        <el-form-item label="原订单下单金额" prop="originalOrderAmount">
          <el-input
            v-model.trim="form.originalOrderAmount"
            placeholder="请输入原订单下单金额"
          />
        </el-form-item>
        <el-form-item label="店铺名称" prop="shopName">
          <el-input v-model.trim="form.shopName" placeholder="请输入店铺名称" />
        </el-form-item>
        <el-form-item label="原订单买家留言" prop="originalOrderBuyerMessage">
          <el-input
            v-model.trim="form.originalOrderBuyerMessage"
            placeholder="请输入原订单买家留言"
          />
        </el-form-item>
        <el-form-item label="线上订单号" prop="orderId">
          <el-input
            v-model.trim="form.orderId"
            placeholder="请输入线上订单号"
          />
        </el-form-item>
        <el-form-item label="原订单业务员" prop="originalOrderSalesperson">
          <el-input
            v-model.trim="form.originalOrderSalesperson"
            placeholder="请输入原订单业务员"
          />
        </el-form-item>
        <el-form-item label="订单日期" prop="orderDate">
          <el-date-picker
            clearable
            v-model="form.orderDate"
            type="date"
            value-format="yyyy-MM-dd"
            placeholder="请选择订单日期"
          >
          </el-date-picker>
        </el-form-item>
        <el-form-item label="订单支付日期" prop="orderPaymentDate">
          <el-date-picker
            clearable
            v-model="form.orderPaymentDate"
            type="date"
            value-format="yyyy-MM-dd"
            placeholder="请选择订单支付日期"
          >
          </el-date-picker>
        </el-form-item>
        <el-form-item label="原订单快递" prop="originalOrderCourier">
          <el-input
            v-model.trim="form.originalOrderCourier"
            placeholder="请输入原订单快递"
          />
        </el-form-item>
        <el-form-item label="备注" prop="remark">
          <el-input v-model.trim="form.remark" placeholder="请输入备注" />
        </el-form-item>
        <el-form-item label="原订单快递单号" prop="originalOrderShipmentId">
          <el-input
            v-model.trim="form.originalOrderShipmentId"
            placeholder="请输入原订单快递单号"
          />
        </el-form-item>
        <el-form-item label="处理结果" prop="processResult">
          <el-input
            v-model.trim="form.processResult"
            placeholder="请输入处理结果"
          />
        </el-form-item>
        <el-form-item
          label="原订单发货仓库"
          prop="originalOrderShipmentwarehouse"
        >
          <el-input
            v-model.trim="form.originalOrderShipmentwarehouse"
            placeholder="请输入原订单发货仓库"
          />
        </el-form-item>
        <el-form-item label="售后问题登记(线下备注)" prop="saleIssueNote">
          <el-input
            v-model.trim="form.saleIssueNote"
            placeholder="请输入售后问题登记(线下备注)"
          />
        </el-form-item>
        <el-form-item label="最后确认日期" prop="lastConfirmationDate">
          <el-date-picker
            clearable
            v-model="form.lastConfirmationDate"
            type="date"
            value-format="yyyy-MM-dd"
            placeholder="请选择最后确认日期"
          >
          </el-date-picker>
        </el-form-item>
        <el-form-item label="最后修改日期" prop="lastModifiedDate">
          <el-date-picker
            clearable
            v-model="form.lastModifiedDate"
            type="date"
            value-format="yyyy-MM-dd"
            placeholder="请选择最后修改日期"
          >
          </el-date-picker>
        </el-form-item>
        <el-form-item label="退回快递公司" prop="returnedShippingCompany">
          <el-input
            v-model.trim="form.returnedShippingCompany"
            placeholder="请输入退回快递公司"
          />
        </el-form-item>
        <el-form-item label="退回快递单号(运单号)" prop="returnShippingCode">
          <el-input
            v-model.trim="form.returnShippingCode"
            placeholder="请输入退回快递单号(运单号)"
          />
        </el-form-item>
        <el-form-item label="订单发货时间" prop="orderShipmentDate">
          <el-date-picker
            clearable
            v-model="form.orderShipmentDate"
            type="date"
            value-format="yyyy-MM-dd"
            placeholder="请选择订单发货时间"
          >
          </el-date-picker>
        </el-form-item>
        <el-form-item label="已提交供销商" prop="submittedSupplier">
          <el-input
            v-model.trim="form.submittedSupplier"
            placeholder="请输入已提交供销商"
          />
        </el-form-item>
        <el-form-item label="已提交分销商" prop="submittedDistributor">
          <el-input
            v-model.trim="form.submittedDistributor"
            placeholder="请输入已提交分销商"
          />
        </el-form-item>
        <el-form-item label="分销商" prop="distributor">
          <el-input
            v-model.trim="form.distributor"
            placeholder="请输入分销商"
          />
        </el-form-item>
        <el-form-item label="退款编码" prop="refundCode">
          <el-input
            v-model.trim="form.refundCode"
            placeholder="请输入退款编码"
          />
        </el-form-item>
        <el-form-item label="售后问题登记(图片)" prop="afterSalesIssueRecord">
          <el-input
            v-model.trim="form.afterSalesIssueRecord"
            placeholder="请输入售后问题登记(图片)"
          />
        </el-form-item>
        <el-form-item label="售后异常" prop="saleExceptionCount">
          <el-input
            v-model.trim="form.saleExceptionCount"
            placeholder="请输入售后异常"
          />
        </el-form-item>
        <el-form-item label="外部单号" prop="externalOrderNumber">
          <el-input
            v-model.trim="form.externalOrderNumber"
            placeholder="请输入外部单号"
          />
        </el-form-item>
        <el-form-item label="图片" prop="imageData">
          <el-input v-model.trim="form.imageData" placeholder="请输入图片" />
        </el-form-item>
        <el-form-item label="商品编码" prop="productCode">
          <el-input
            v-model.trim="form.productCode"
            placeholder="请输入商品编码"
          />
        </el-form-item>
        <el-form-item label="款式编码" prop="styleCode">
          <el-input
            v-model.trim="form.styleCode"
            placeholder="请输入款式编码"
          />
        </el-form-item>
        <el-form-item label="线上子订单编号" prop="orderSubId">
          <el-input
            v-model.trim="form.orderSubId"
            placeholder="请输入线上子订单编号"
          />
        </el-form-item>
        <el-form-item label="申请数量" prop="applicationCount">
          <el-input
            v-model.trim="form.applicationCount"
            placeholder="请输入申请数量"
          />
        </el-form-item>
        <el-form-item label="退货数量" prop="returnQuantity">
          <el-input
            v-model.trim="form.returnQuantity"
            placeholder="请输入退货数量"
          />
        </el-form-item>
        <el-form-item label="单价" prop="unitPrice">
          <el-input v-model.trim="form.unitPrice" placeholder="请输入单价" />
        </el-form-item>
        <el-form-item label="申请金额" prop="appAmount">
          <el-input
            v-model.trim="form.appAmount"
            placeholder="请输入申请金额"
          />
        </el-form-item>
        <el-form-item label="商品名" prop="productName">
          <el-input
            v-model.trim="form.productName"
            placeholder="请输入商品名"
          />
        </el-form-item>
        <el-form-item label="颜色规格" prop="colorSpecification">
          <el-input
            v-model.trim="form.colorSpecification"
            placeholder="请输入颜色规格"
          />
        </el-form-item>
        <el-form-item label="进仓时间" prop="entryTime">
          <el-date-picker
            clearable
            v-model="form.entryTime"
            type="date"
            value-format="yyyy-MM-dd"
            placeholder="请选择进仓时间"
          >
          </el-date-picker>
        </el-form-item>
      </el-form>
      <div slot="footer" class="dialog-footer">
        <el-button type="primary" @click="submitForm">确 定</el-button>
        <el-button @click="cancel">取 消</el-button>
      </div>
    </el-dialog>
  </div>
</template>

<script>
import {
  listBiOrderAftersales,
  getBiOrderAftersales,
  delBiOrderAftersales,
  addBiOrderAftersales,
  updateBiOrderAftersales,
} from "@/api/live/BiOrderAftersales";

// import uploadFile from "@/views/components/uploadFile/index.vue";
export default {
  name: "BiOrderAftersales",
  components: {
    // uploadFile,
  },
  data() {
    return {
      isOpen: false,
      inputValue: "",
      // 遮罩层
      loading: true,
      // 选中数组
      ids: [],
      // 非单个禁用
      single: true,
      // 非多个禁用
      multiple: true,
      // 显示搜索条件
      showSearch: true,
      // 总条数
      total: 0,
      // 订单售后表格数据
      BiOrderAftersalesList: [],
      // 弹出层标题
      title: "",
      // 是否显示弹出层
      open: false,
      // 查询参数
      queryParams: {
        pageNum: 1,
        pageSize: 10,
        isDelete: null,
        saleOrderNumber: null,
        internalOrderNumber: null,
        registrationTime: null,
        appDate: null,
        onlineType: null,
        afterSalesCategory: null,
        visitorId: null,
        detailRemark: null,
        otherPrice1: null,
        originalOrderShippingCountry: null,
        receiverName: null,
        defectiveCount: null,
        otherPrice2: null,
        applicationAmount: null,
        vfuReturnWarehouse: null,
        otherPrice3: null,
        onlineReturnShippingFee: null,
        vfuDefectStock: null,
        otherPrice4: null,
        discountAmount: null,
        costPrice: null,
        otherAttribute1: null,
        sellerRefundAmount: null,
        productBrand: null,
        otherAttribute2: null,
        buyerCompensationAmount: null,
        originalOrderId: null,
        otherAttribute3: null,
        sellerReturnShippingFee: null,
        productTag: null,
        otherAttribute4: null,
        actualRefundAmount: null,
        category: null,
        otherAttribute5: null,
        buyerRefundAccount: null,
        supplierProductSku: null,
        originalOrderFlag: null,
        sellerRefundAccount: null,
        supplierProductCode: null,
        originalOrderNote: null,
        warehouseReceived: null,
        shortName: null,
        originalOrderTag: null,
        warehouse: null,
        nationalStandardCode: null,
        originalOrderNoteOrOfflineNote: null,
        shopId: null,
        originalOrderAmount: null,
        shopName: null,
        originalOrderBuyerMessage: null,
        orderId: null,
        originalOrderSalesperson: null,
        issueType: null,
        orderDate: null,
        originalOrderStatus: null,
        orderPaymentDate: null,
        originalOrderType: null,
        originalOrderCourier: null,
        originalOrderShipmentId: null,
        processResult: null,
        originalOrderShipmentwarehouse: null,
        saleIssueNote: null,
        status: null,
        onlineStatus: null,
        itemStatus: null,
        lastConfirmationDate: null,
        lastModifiedDate: null,
        returnedShippingCompany: null,
        returnShippingCode: null,
        orderShipmentDate: null,
        submittedSupplier: null,
        submittedDistributor: null,
        distributor: null,
        refundCode: null,
        afterSalesIssueRecord: null,
        currencyType: null,
        saleExceptionCount: null,
        externalOrderNumber: null,
        imageData: null,
        productCode: null,
        styleCode: null,
        orderSubId: null,
        applicationCount: null,
        returnQuantity: null,
        unitPrice: null,
        appAmount: null,
        productName: null,
        dataType: null,
        detailIssueType: null,
        colorSpecification: null,
        entryTime: null,
      },
      // 表单参数
      form: {},
      // 表单校验
      rules: {},
    };
  },
  created() {
    this.getList();
  },
  methods: {
    shouqi() {
      // console.log(1);
      this.isOpen = !this.isOpen;
    },
    /** 查询订单售后列表 */
    getList() {
      this.loading = true;
      listBiOrderAftersales(this.queryParams).then((response) => {
        this.BiOrderAftersalesList = response.rows;
        this.total = response.total;
        this.loading = false;
      });
    },
    // 取消按钮
    cancel() {
      this.open = false;
      this.reset();
    },
    // 表单重置
    reset() {
      this.form = {
        id: null,
        createTime: null,
        updateTime: null,
        isDelete: null,
        saleOrderNumber: null,
        internalOrderNumber: null,
        registrationTime: null,
        appDate: null,
        onlineType: null,
        afterSalesCategory: null,
        visitorId: null,
        detailRemark: null,
        otherPrice1: null,
        originalOrderShippingCountry: null,
        receiverName: null,
        defectiveCount: null,
        otherPrice2: null,
        applicationAmount: null,
        vfuReturnWarehouse: null,
        otherPrice3: null,
        onlineReturnShippingFee: null,
        vfuDefectStock: null,
        otherPrice4: null,
        discountAmount: null,
        costPrice: null,
        otherAttribute1: null,
        sellerRefundAmount: null,
        productBrand: null,
        otherAttribute2: null,
        buyerCompensationAmount: null,
        originalOrderId: null,
        otherAttribute3: null,
        sellerReturnShippingFee: null,
        productTag: null,
        otherAttribute4: null,
        actualRefundAmount: null,
        category: null,
        otherAttribute5: null,
        buyerRefundAccount: null,
        supplierProductSku: null,
        originalOrderFlag: null,
        sellerRefundAccount: null,
        supplierProductCode: null,
        originalOrderNote: null,
        warehouseReceived: null,
        shortName: null,
        originalOrderTag: null,
        warehouse: null,
        nationalStandardCode: null,
        originalOrderNoteOrOfflineNote: null,
        shopId: null,
        originalOrderAmount: null,
        shopName: null,
        originalOrderBuyerMessage: null,
        orderId: null,
        originalOrderSalesperson: null,
        issueType: null,
        orderDate: null,
        originalOrderStatus: null,
        orderPaymentDate: null,
        originalOrderType: null,
        originalOrderCourier: null,
        remark: null,
        originalOrderShipmentId: null,
        processResult: null,
        originalOrderShipmentwarehouse: null,
        saleIssueNote: null,
        status: null,
        onlineStatus: null,
        itemStatus: null,
        lastConfirmationDate: null,
        lastModifiedDate: null,
        updateBy: null,
        createBy: null,
        returnedShippingCompany: null,
        returnShippingCode: null,
        orderShipmentDate: null,
        submittedSupplier: null,
        submittedDistributor: null,
        distributor: null,
        refundCode: null,
        afterSalesIssueRecord: null,
        currencyType: null,
        saleExceptionCount: null,
        externalOrderNumber: null,
        imageData: null,
        productCode: null,
        styleCode: null,
        orderSubId: null,
        applicationCount: null,
        returnQuantity: null,
        unitPrice: null,
        appAmount: null,
        productName: null,
        dataType: null,
        detailIssueType: null,
        colorSpecification: null,
        entryTime: null,
      };
      this.resetForm("form");
    },
    /** 搜索按钮操作 */
    handleQuery() {
      this.queryParams.pageNum = 1;
      this.getList();
    },
    /** 重置按钮操作 */
    resetQuery() {
      this.resetForm("queryForm");
      this.handleQuery();
    },
    // 多选框选中数据
    handleSelectionChange(selection) {
      this.ids = selection.map((item) => item.id);
      this.single = selection.length !== 1;
      this.multiple = !selection.length;
    },
    /** 新增按钮操作 */
    handleAdd() {
      this.reset();
      this.open = true;
      this.title = "添加订单售后";
    },
    /** 修改按钮操作 */
    handleUpdate(row) {
      this.reset();
      const id = row.id || this.ids;
      getBiOrderAftersales(id).then((response) => {
        this.form = response.data;
        this.open = true;
        this.title = "修改订单售后";
      });
    },
    /** 提交按钮 */
    submitForm() {
      this.$refs["form"].validate((valid) => {
        if (valid) {
          if (this.form.id != null) {
            updateBiOrderAftersales(this.form).then((response) => {
              this.$modal.msgSuccess("修改成功");
              this.open = false;
              this.getList();
            });
          } else {
            addBiOrderAftersales(this.form).then((response) => {
              this.$modal.msgSuccess("新增成功");
              this.open = false;
              this.getList();
            });
          }
        }
      });
    },
    /** 删除按钮操作 */
    handleDelete(row) {
      const ids = row.id || this.ids;
      this.$modal
        .confirm('是否确认删除订单售后编号为"' + ids + '"的数据项？')
        .then(function () {
          return delBiOrderAftersales(ids);
        })
        .then(() => {
          this.getList();
          this.$modal.msgSuccess("删除成功");
        })
        .catch(() => {});
    },
    /** 导出按钮操作 */
    handleExport() {
      this.download(
        "live/BiOrderAftersales/export",
        {
          ...this.queryParams,
        },
        `BiOrderAftersales_${new Date().getTime()}.xlsx`
      );
    },
    //图片上传前的相关判断
    beforeAvatarUpload(file) {
      // const isJPG = file.type == 'image/jpeg' || file.type == 'image/png';
      const isLt2M = file.size / 1024 / 1024 < 100;
      // if (!isJPG) {
      //     this.$message.error('上传头像图片只能是 JPG/PNG 格式!');
      // }
      if (!isLt2M) {
        this.$message.error("上传导入文件大小不能超过 100MB!");
      }
      this.openUploadLoading();
      return isLt2M;
    },
    //图片预览
    handlePictureCardPreview(file) {
      this.picUrl = file.url;
      this.imageUrl = file.url;
      // this.dialogVisible = true;
    },
    //部门文件导入修改打开
    daoru() {
      this.dialogVisible = true;
    },
    // 打开加载层
    openUploadLoading() {
      this.$modal.loading("正在导入，请稍候！");
    },
    //文件导入成功回传

    handlePictureSuccessPic(response, file) {
      this.$refs.daoru.clearFiles(); //去掉文件列表
      this.$modal.closeLoading();
      console.log(JSON.stringify(file));
      console.log(JSON.stringify(response));
      // this.dialogVisible = true;
      // this.dialogVisibleList = response;
      // if (response.code == 200) {

      this.$modal.msgSuccess("导入成功");
      this.getList();
      // }

      // this.openmsg = true;
      // this.msg = response.msg;

      //设置图片访问路径 （url 后台传过来的的上传地址）
      // this.picUrl = file.response.url;
      // const url = file.response.fileName;
      // this.file = file.response.url;
      // console.log(JSON.stringify(this.file));
      // if (res.code == 200) {

      //   this.dialogVisible = false

      //   if (res.msg == '操作成功') {

      //     this.$modal.msgSuccess('导入成功')
      //   } else {
      //     this.$modal.msgError(res.msg);
      //   }
      //   this.getList();
      //   // return true
      // } else {
      //   this.$modal.msgError(res.msg);
      //   this.dialogVisible = true
      //   // this.$message.msgError('该颜色未在字典定义')
      //   return
      // }
    },

    // 文件个数超出
    handleExceed() {
      this.$modal.msgError(`上传链接文件数量不能超过 ${this.limit} 个!`);
    },
    // 上传文件让第二次覆盖第一的文件
    changeFile1(file, fileList) {
      if (fileList.length > 1) {
        this.fileLi = fileList.slice(-1);

        // this.fileList = [fileList[fileList.length - 1]]//这一步，是 展示最后一次选择文件
      }
      // this.fileSpecial = fileList;
    },
  },
};
</script>
